package tt.com.common.model;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import tt.com.common.annotation.IsNull;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 物品表
 * IsNull:
 * <br> organId(预警数量)
 * <br> name(物品名称)
 * <br> targetId(供应商id)
 * <br> costPrice(成本价格)
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "yx_common_warehouse_goods")
public class YxCommonWarehouseGoods {
    public static final String COL_ID = "id";
    public static final String COL_CREATE_TIME = "create_time";
    public static final String COL_CREATE_USER_ID = "create_user_id";
    public static final String COL_LAST_UPDATE_TIME = "last_update_time";
    public static final String COL_LAST_UPDATE_USER_ID = "last_update_user_id";
    public static final String COL_DELETE_TIME = "delete_time";
    public static final String COL_DELETE_USER_ID = "delete_user_id";
    public static final String COL_DATA_STATUS = "data_status";
    public static final String COL_ORGAN_ID = "organ_id";
    public static final String COL_TARGET_ID = "target_id";
    public static final String COL_NAME = "name";
    public static final String COL_COST_PRICE = "cost_price";
    public static final String COL_PRICE = "price";
    public static final String COL_PRICE_UNIT = "price_unit";
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;
    /**
     * 创建人
     */
    @TableField(value = "create_user_id")
    private String createUserId;
    /**
     * 最后修改时间
     */
    @TableField(value = "last_update_time")
    private Date lastUpdateTime;
    /**
     * 最后修改人
     */
    @TableField(value = "last_update_user_id")
    private String lastUpdateUserId;
    /**
     * 删除时间
     */
    @TableField(value = "delete_time")
    private Date deleteTime;
    /**
     * 删除人
     */
    @TableField(value = "delete_user_id")
    private String deleteUserId;
    /**
     * 删除状态(0删除 1正常)
     */
    @TableLogic
    @TableField(value = "data_status")
    private Integer dataStatus;
    /**
     * 预警数量
     */
    @TableField(value = "organ_id")
    @IsNull
    private String organId;
    /**
     * 供应商id
     */
    @TableField(value = "target_id")
    @IsNull
    private String targetId;
    /**
     * 物品名称
     */
    @TableField(value = "`name`")
    @IsNull
    private String name;
    /**
     * 成本价格
     */
    @TableField(value = "cost_price")
    @IsNull
    private BigDecimal costPrice;
    /**
     * 服务价格
     */
    @TableField(value = "price")
    private BigDecimal price;
    /**
     * 服务价格单位
     */
    @TableField(value = "price_unit")
    private String priceUnit;
}